import requests from "./requests";

export const addCart=(book)=>{
    return requests({
        method:'POST',
        url:'/api/addCart',
        data:{
            ...book
        }
    })
}
export const getCart=()=>{
    return requests({
        method:'GET',
        url:'/api/getCart',
    })
}

export const deleteCart=(id)=>{
    return requests({
        method:'DELETE',
        url:'/api/deleteCart',
        data:{
            id
        }
    })
}

export const checkAllBook=()=>{
    return requests({
        method:'POST',
        url:'/api/checkAll',
    })
}

export const changeCartStatus=(data)=>{
    return requests({
        method:'POST',
        url:'/api/changeChecked',
        data:{
            ...data
        }
    })
}
